﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using NLog;
using ZOIL.DataModel;

namespace ZOIL.DataBackend.Server
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        #region Logger

        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

        #endregion

        public App()
        {
            Startup += new StartupEventHandler(App_Startup);
        }

        void App_Startup(object sender, StartupEventArgs e)
        {
            Logger.Debug("Starting Server");
            PluginManager.Instance.LoadPlugins();

            //eventually put this in an extra mvvm util class
            PluginManager.Instance.RegisterAttribute<ViewFor>();
            PluginManager.Instance.RegisterAttribute<ViewModelFor>();
            PluginManager.Instance.Scan();
        }
    }
}
